package com.gscitysfy.cus.drain.modules.command.controller;


import com.gscitysfy.cloudfrmwk.assistant.domain.Result;
import com.gscitysfy.cus.drain.modules.command.entity.DrainCommandDispatchSchemeCar;
import com.gscitysfy.cus.drain.modules.command.entity.DrainCommandDispatchSchemeTeam;
import com.gscitysfy.cus.drain.modules.command.service.IDrainCommandDispatchSchemeTeamService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

/**
 * <p>
 * 预警对应四个等级的应急队伍 前端控制器
 * </p>
 *
 * @author Administrator
 * @since 2022-11-16 15:28:24
 */
@RestController
@RequestMapping("/schemeTeam")
public class DrainCommandDispatchSchemeTeamController {
    @Autowired
    IDrainCommandDispatchSchemeTeamService drainCommandDispatchSchemeTeamService;
    /**
     * 获取预警机制详情
     * @return
     */
    @Operation(summary = "获取调度方案的队伍")
    @GetMapping("/listOrDetail")
    public Result<Object> listOrDetail(@Parameter(hidden = true) DrainCommandDispatchSchemeTeam drainCommandDispatchSchemeTeam){
        return drainCommandDispatchSchemeTeamService.getListByQuery( drainCommandDispatchSchemeTeam);
    }
    @Operation(summary = "调度方案删除队伍")
    @PostMapping(value = "/deleteSchemeTeam")
    public Result<Boolean> deleteSchemeTeam(@RequestBody DrainCommandDispatchSchemeTeam dto) {
        return Result.content(drainCommandDispatchSchemeTeamService.deleteSchemeTeam(dto));
    }
}
